#include <iostream>
#include "template.h"

void TestPaper::Q1()
{
    std::cout << "Q1:why?" << std::endl;
    std::cout << "A1:" << A1() << std::endl;
}

void TestPaper::Q2()
{
    std::cout << "Q2:what?" << std::endl;
    std::cout << "A2:" << A2() << std::endl;
}

void TestPaper::Q3()
{
    std::cout << "Q3:where?" << std::endl;
    std::cout << "A3:" << A3() << std::endl;
}

std::string UserA::A1()
{
    return "A";
}

std::string UserA::A2()
{
    return "B";
}

std::string UserA::A3()
{
    return "A";
}

std::string UserB::A1()
{
    return "B";
}

std::string UserB::A2()
{
    return "C";
}

std::string UserB::A3()
{
    return "A";
}

int main()
{
    TestPaper *A = new UserA;
    TestPaper *B = new UserB;

    A->Q1();
    A->Q2();
    A->Q3();

    B->Q1();
    B->Q2();
    B->Q3();

    delete A;
    delete B;
    return 0;
}





